package com.szgr.baoyin.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;

import com.android.volley.toolbox.ImageLoader;
import com.szgr.baoyin.MyApplication;
import com.szgr.baoyin.R;

/**
 * Created by Jimbo on 2015/9/22.
 */
public class FinanceListAdapter extends BaseAdapter {
    private Context mContext;
    public FinanceListAdapter(Context context){
        mContext = context;
    }
    @Override
    public int getCount() {
        return 7;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        if(convertView == null){
            convertView = LayoutInflater.from(mContext).inflate(R.layout.item_finance_list_view,parent,false);

        }
        ImageView img_finance = (ImageView) convertView.findViewById(R.id.finance_image_view);
        ImageLoader.ImageListener listener = ImageLoader.getImageListener(img_finance, R.drawable.home_page, R.drawable.home_page);
        MyApplication.getmInstance().getImageLoader().get("http://www.365zhuti.com/wall/UploadPic/2012-4/365zhuti_20120418095954_0.jpg", listener);
        return convertView;
    }
}
